#pragma once
#include <vector>
#include <cstddef>

// AOS
struct alignas(16) ParticleAoS {
    float x, y, z, w;
    double mass;
};

// SOA: 在遍历单一组件时更具缓存友好性
struct ParticlesSoA {
    std::vector<float> x, y, z, w;
    std::vector<double> mass;
    explicit ParticlesSoA(std::size_t n = 0)
        : x(n), y(n), z(n), w(n), mass(n) {}
    std::size_t size() const { return x.size(); }
};